home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ 12⁄22⁄89 / 0256-Memory Clarification-Dec89 < prev    next >
Encoding:
Text File  |  1989-12-22  |  2.0 KB  |  56 lines  |  [TEXT/GEOL]

  1. Item    0190300                         22-Dec-89        10:19
  2.  
  3. From:   MADA2                           MacApp Dev Assoc, Curtis Faith
  4.  
  5. To:     MACAPP.TECH$                    MacApp Technical
  6.  
  7. Sub:    Memory Clarifications
  8.  
  9. Some MacApp memory questions,
  10.  
  11. I think I have a pretty good idea how MacApp's memory scheme works but I would
  12. appreciate a few clarifications.
  13.  
  14. Here is what I think:
  15.  
  16. Permanent memory is permanent because MacApp does not know about it and hence
  17. cannot purge it during its GrowZone function.
  18.  
  19. Temporary memory is such because MacApp has a list of all temporary handles and
  20. thus can purge it in the GrowZone function.
  21.  
  22. Here is where I need confirmation:
  23.  
  24. I believe that the important point is handle creation.  That is a handle
  25. created via NewPermHandle will always be permanent since the implication is
  26. that MacApp does not know it exists.  Calls to SetHandleSize, PtrAndHand,
  27. HandAndHand will have no effects on its status as a permanent handle.  Thus:
  28.  
  29. oldPerm := PermAllocation(TRUE);
  30. SetHandleSize(h,45);
  31. oldPerm := PermAllocation(oldPerm);
  32.  
  33. is not necessary. Is this true?  Or has MacApp patched SetHandleSize in some
  34. way also?
  35.  
  36. What about functions such as HandToHand which makes a copy of the data
  37. contained in a handle and returns a new handle to the data copy.  Is it
  38. necessary to call PermAllocation(TRUE) to insure that the new handle will not
  39. be added to the temporary list?  My gut feeling is that it would be but I
  40. cannot confirm this anywhere.  All I read is the vague "for other kinds of
  41. requests you set the 'permanent' flag to TRUE by calling PermAllocation(TRUE)".
  42. Does this mean that every possible handle creation is detected by some very low
  43. level patch to the memory manager, or just calls that at some time call
  44. NewHandle.
  45.  
  46. Can I make the statement that any handles created with the permanent flag set
  47. to false will be added to the list of handles maintained by MacApp?  If not
  48. what are the exceptions?
  49.  
  50. Please feel free to dispel any misconceptions and set me straight.
  51.  
  52. yours,
  53.  
  54. Curtis Faith
  55.  
  56.